<?php
JunctionFileCabinet::using("Junction_Core_Iterator");

class Test_Mock_CoreIterator extends Junction_Core_Iterator {
	
	private $_mapping;
	
	private $_size = 4;
	
	public function __construct(Test_Mock_Mapping $map) {
		$this->_mapping = $map;
	}
	
	public function next() {
		$this->_size--;
	}
	
	public function current() {
		return $this->_mapping->makeClientFrom(array());
	}

	public function value() {
		return $this->_size; 
	}
	
	public function valid() {
		return ($this->_size > 0);
	}
	
	public function rewind() {
		$this->_size = 4;
	}
}
?>